Previous Book Contents Book Index Next

Inside Macintosh: Open Transport /
Chapter 8 - TCP/IP Services / TCP/IP Services Reference
Functions / Opening a TCP/IP Service Provider


OTAsyncOpenInternetServices

Opens the TCP/IP service provider and returns an internet services reference. This function runs asynchronously.

C INTERFACE
OSStatus OTAsyncOpenInternetServices (OTConfiguration *cfig,
                                      OTOpenFlags oflag,
                                      OTNotifyProcPtr proc,
                                      void *contextPtr);
C++ INTERFACE
None. C++ clients use the C interface to this function.

PARAMETERS
cfig
A pointer to a network configuration structure. Specify nil for this parameter to have the function provide the network configuration structure for you. You can also obtain this pointer by using the constant kDefaultInternetServicesPath for this parameter.
oflag
Reserved. Must be set to 0.
proc
A pointer to your notifier function. The TCP/IP service provider passes the internet services reference to your notifier function in the cookie parameter.
contextPtr
A pointer for your use. The TCP/IP service provider passes this value unchanged to your notifier function.
DESCRIPTION
You must open the TCP/IP service provider before calling any TCP/IP services function other than the address utility functions. You must provide the internet services reference when calling any of these non-utility functions. The OTAsyncOpenInternetServices function also sets the mode of all other TCP/IP service provider functions as asynchronous.

If you want to set an option as part of the configuration string, you should translate the option's constant name, given in the header files, into a string that the configuration functions can parse. For the TCP/IP options, Table 8-2 provides the constant name used in "Options," beginning on page 8-28 and the value to use in the configuration string.
Table 8-2 Configuration strings for TCP/IP options
Constant nameConfiguration string value
IP_OPTIONS"Options"
IP_TOS"TOS"
IP_TTL"TTL"
IP_RCVDSTADDR"RcvDestAddr"
IP_RCVIFADDR"RcvIFAddr"
IP_RCVOPTS"RcvOPts"
IP_REUSEADDR"ReuseAddr"
IP_DONTROUTE"DontRoute"
IP_BROADCAST"Broadcast"
IP_HDRINCL"HdrIncl"
IP_MULTICAST_IP"MulticastIF"
IP_MULTICAST_TTL"MulticastTTL"
IP_MULTICAST_LOOP"MulticastLoop"
IP_ADD_MEMBERSHIP"AddMembership"
IP_DROP_MEMBERSHIP"DropMembership"
IP_BROADCAST_IF"BroadcastIF"
UDP_CHECKSUM"Checksum"
UDP_RX_ICMP"RxICMP"
TCP_NODELAY"NoDelay"
TCP_OOBINLINE"OOBInline"
 
TCB_MAXSEG"MaxSeg"
TCP_NOTIFY_THRESHOLD"NotifyThreshold"
TCP_ABORT_THRESHOLD"AbortThreshold"
TCP_CONN_NOTIFY_THRESHOLD"ConnNotifyThreshold"
TCP_CONN_ABORT_THRESHOLD"ConnAbortThreshold"
TCP_KEEPALIVE"KeepAlive"

COMPLETION EVENT CODES
T_OPENCOMPLETE0x20000007The OTAsyncOpenInternetServices function has completed.
SEE ALSO
The OTOpenInternetServices function (described next) is a synchronous version of the TCP/IP open services function.

The network configuration structure and OTCreateConfiguration function are described in the chapter "Configuration Management" in this book.

Use the OTCloseProvider function, described in the chapter "Endpoints" in this book, to close a TCP/IP service provider when you are finished using it.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
15 AUG 1996